<%@ taglib prefix="spring-tags" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="spring-form" uri="http://www.springframework.org/tags/form"%>
<%@ page
    import="org.jiscinvolve.astrodabis.mallow.model.api.Account"
    import="org.jiscinvolve.astrodabis.mallow.control.ViewData"
    session="true"
%>
<%@ include file="/jsp/init.jsp" %>
<html>
    <head>
	    <title>AstroDAbis regsitration</title>
        <link href='/astrodabis/css/page.css' rel='stylesheet' type='text/css'/>
    </head>

    <body>
        <%@ include file="/jsp/header.jsp" %>
        <div class='body'>
            <div class='left'>
                <%@ include file="/jsp/menu.jsp" %>
            </div>
            <div class='right'>
            </div>
            <div class='content'>
		    <h2>Login</h2>
      			<spring-form:errors path="form"/>
		        <spring-form:form method="post" modelAttribute="form">
		          	<fieldset>
		          		<legend>User name</legend>
	              		<spring-form:input  path="name"/>
              			<spring-form:errors path="name"/>
		          	</fieldset>
		          	<fieldset>
		          		<legend>Email address</legend>
		          		<spring-form:input  path="mail"/>
	          			<spring-form:errors path="mail"/>
		          	</fieldset>
		          	<fieldset>
		          		<legend>Password</legend>
		          		<spring-form:password path="pass"/>
	          			<spring-form:errors path="pass"/>
		          	</fieldset>
			        <div>
			            <button type="submit">Register</button>
		            </div>
		        </spring-form:form>
	            <div>
                    <a href="<%= data.path("login") %>">Login with existing account</a>
	            </div>
            </div>
        </div>
        <%@ include file="/jsp/footer.jsp" %>
    </body>
</html>

